import 'package:flutter/material.dart';
import 'package:flutter_cwhisky/common/style/images.dart';
import 'package:flutter_cwhisky/pages/main/home/auction/auction_view.dart';
import 'package:flutter_cwhisky/pages/main/home/choice/choice_view.dart';
import 'package:flutter_cwhisky/pages/main/home/evaluate/evaluate_view.dart';
import 'package:flutter_cwhisky/pages/main/home/information/information_view.dart';
import 'package:flutter_cwhisky/pages/main/home/video/video_view.dart';
import 'package:get/get.dart';

import '../../../component/base/keep_alive_wrapper.dart';
import 'community/community_view.dart';

class HomeLogic extends GetxController with GetSingleTickerProviderStateMixin {
  late final TabController tabController;
  final List<String> tiles = ["精选", "拍卖", "社区", "资讯", "云品鉴", "视频"];
  final List<Widget> fragments = [
    const KeepAliveWrapper(child: ChoicePage()),
    const KeepAliveWrapper(child: AuctionPage()),
    const KeepAliveWrapper(child: CommunityPage()),
    const KeepAliveWrapper(child: InformationPage()),
    const KeepAliveWrapper(child: EvaluatePage()),
    const KeepAliveWrapper(child: VideoPage())
  ];
  String messageIcon = AppImages.iconTitleMessage;

  @override
  void onInit() {
    super.onInit();
    tabController = TabController(length: tiles.length, vsync: this, initialIndex: 0);
  }
}
